package com.example.administrator.a0013fragment;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void oneFragment(View v){
        getSupportFragmentManager().beginTransaction()
                .replace(R.id.fg_content,bottomFragment.newInstance()).commitNow();
    }

    public void twoFragment(View v){
        getSupportFragmentManager().beginTransaction()
                .replace(R.id.fg_content,TwoFragment.newInstance()).commitNow();
    }
}
